<%@include file="header.jsp"%>

<div class="tabela"><s:if test="#request.albuns">
	<h1><s:text name="Albuns" /></h1>
	<table id="myTable" class="tablesorter">
		<thead>
			<tr>
				<th><s:text name="Nome" /></th>
				<th><s:text name="Preco" /></th>
				<th><s:text name="OfertasVenda" /></th>
			</tr>
		</thead>
		<tbody>
			<s:iterator value="#request.albuns">
				<tr>
					<s:url var="url" action="detalhaAlbum" namespace="/album" escapeAmp="false" >
						<s:param name="idAlbum" value="id" />
						<s:param name="nomeAlbum" value="nome" />
					</s:url>
					<td><a href="<s:property value="#url" />"><s:property escapeHtml="false" value="nome" /></a></td>
					<s:action name="getOfertasAtivas" namespace="/album" executeResult="false">
						<s:param value="id" name="idAlbum" />
					</s:action> 
					<td><a href="<s:property value="#url" />"><s:property escapeHtml="false" value="#attr.menorPreco" /></a></td>
					<td><a href="<s:property value="#url" />"><s:property escapeHtml="false" value="#attr.ofertasAtivas" /></a></td>
				</tr>
			</s:iterator>
		</tbody>
	</table>

	<div id="pager" class="pager">
	<form><img src="<s:url value="/img/first.png"/>" class="first" />
	<img src="<s:url value="/img/prev.png"/>" class="prev" /> <input type="text" class="pagedisplay" /> 
	<img src="<s:url value="/img/next.png"/>" class="next" /> <img src="<s:url value="/img/last.png"/>" class="last" /> 
	<select	class="pagesize">
		<option value="10">10</option>
		<option value="20">20</option>
		<option selected="selected" value="25">25</option>
		<option value="30">30</option>
		<option value="40">40</option>
	</select></form>
	</div>

</s:if> <s:else>
	<h2><s:text name="mensagem.nao.existem.albuns.estilo" /></h2>
</s:else>
</div>

<%@include file="footer.jsp"%>